package com.woniuxy.commons.service;

import com.woniuxy.commons.entity.Image;
import com.woniuxy.commons.utils.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 雷珉
 * @date 2022年06月10日 16:09
 */
@FeignClient(name = "aliyunoss")
public interface ImageService {

    @GetMapping("/aliyunoss/image/{module}/{relatedId}")
    public ResponseResult<List<Image>> findByModuleAndRelatedId(@PathVariable("module") String module, @PathVariable("relatedId") int relatedId);

    @PutMapping("/aliyunoss/image/")
    public ResponseResult addOne(@RequestBody Image image);

    @DeleteMapping("/aliyunoss/image/{id}")
    public ResponseResult deleteOne(@PathVariable("id") int id);
}